// run: $exec < input
#include <iostream>
#include <functional>
#include <algorithm>
#include <vector>

int main()
{
	int n; std::cin >> n;
	std::vector<int> a(n);
	for (int i = 0; i < n; i++) std::cin >> a[i];
	std::vector<int> b = a;
	std::sort(a.begin(), a.end(), std::greater<int>());
	for (int i = 0; i < n; i++) {
		int ans = 0;
		for (; ans < n; ans++)
			if (a[ans] == b[i]) break;
		std::cout << ans + 1 << " ";
	}

}

